import matplotlib.pyplot as plt
import matplotlib.font_manager as fm

my_font = fm.FontProperties(fname="../font/msyh.ttc")

# a = [5, 6, 7, 8]
a = ["中文样例1", "日本語サンプル", "中文样例3", "Example1"]
b_1 = [10, 32, 23, 19]
b_2 = [12, 34, 28, 10]

plt.figure(figsize=(16, 9), dpi=80)

x = range(len(a))
x_2 = [i + 0.25 for i in x]

plt.barh(x, b_1, height=0.5)
plt.barh(x_2, b_2, height=0.5, alpha=0.5)

plt.yticks(range(len(a)), a, fontProperties=my_font)

# 网格线
plt.grid()

plt.show()
